package com.ruoyi.service.impl;

import com.ruoyi.dao.TestDao;
import com.ruoyi.mapper.TestMapper;
import com.ruoyi.model.TestInfo;
import com.ruoyi.service.TestService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class TestServiceImpl implements TestService {

    @Resource
    private TestDao testDao;

    @Resource
    private TestMapper testMapper;

    /**
     * 新增xx信息
     *
     * @param entity
     * @return
     */
    @Override
    public boolean addTestInfo(TestInfo entity) {
        try {
            testDao.addTest(entity);
            return true;
        } catch (Exception e) {
            return false;
        }
    }

    /**
     * 新增xx信息
     *
     * @param entity
     * @return
     */
    @Override
    public boolean addTestInfoMapper(TestInfo entity) {
        try {
            testMapper.addTest(entity);
            return true;
        } catch (Exception e) {
            return false;
        }
    }
}
